﻿Imports TMySQL
Public Class frmTableSource
    Private _Table As IHasColumns
    Public Sub New(ByVal ATable As IHasColumns)
        Me.New()
        _Table = ATable
        InitFrm()
    End Sub
    Private Sub New()
        ' この呼び出しは、Windows フォーム デザイナで必要です。
        InitializeComponent()
        ' InitializeComponent() 呼び出しの後で初期化を追加します。
    End Sub

    Private Sub InitFrm()
        frmMain.GeneralSettings.ApplyAll(Me)
        frmMain.EditorSettings.ApplyAll(Me)
        frmMain.GridSettings.ApplyAll(Me)
        txtSource.Text = _Table.Source
    End Sub

    Public Sub ApplyControlFontSettings(ByVal AControl As Control, ByVal ASettings As TGeneralSettings)
        For Each ctrl As Control In Me.Controls
            If ctrl.Controls.Count > 0 Then
                ApplyControlFontSettings(ctrl, ASettings)
            End If
            If Not ctrl.GetType Is GetType(Sgry.Azuki.WinForms.AzukiControl) Then
                ctrl.Font = ASettings.Font
                ctrl.BackColor = ASettings.BackColor
                ctrl.ForeColor = ASettings.ForeColor
            End If
        Next
    End Sub

End Class